package cn.edu.sicnu.cardgame

class Card(private var suit: Int, var isChosen: Boolean = false, var isMatched: Boolean = false)  {
    companion object {
        val Suit= arrayOf(1, 2, 3, 4, 5, 6, 7, 8,11,12,
            13,14,15,16,17,18)
//        val validSuits = arrayOf("♥", "♦", "♠", "♣")
    }

    override fun toString(): String {
        return suit.toString()
    }

    fun match(otherCards: Array<Card>): Int {
        var score = 0
        if (otherCards.size == 1) {
            val otherCard = otherCards[0]
            if (otherCard.suit%10 == suit) {
                score = 1
            }
        }
        return score
    }
}